<?php
declare (strict_types = 1);
namespace app\course\logic\classes\admin;

use app\course\model\classes\admin\Order as OrderModel;

/**
 * 订单管理逻辑层
 */
class Order extends OrderModel
{
    /**
     * 获取订单列表
     * Author   Martinsun<syh@sunyonghong.com>
     * Date 2020-07-04
     * @param    array                          $map [description]
     * @return   [type]                              [description]
     */
    public function getList(array $map)
    {
        return $this->with(['course', 'transaction', 'school', 'user', 'pdorder'])->withJoin(['user', 'pdorder', 'transaction'], 'LEFT')->where($map)->order('update_time', 'DESC')->paginate($this->getListRows());
    }
}
